package cn.jark.redis.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @author 雨一直夏灬(须知少年凌云志, 曾许人间第一流)
 * @since 2020-11-09
 */
@ConfigurationProperties(prefix = "jark.cache-manager")
public class CacheManagerProperties {

    private List<CacheConfig> configs;

    public List<CacheConfig> getConfigs() {
        return configs;
    }

    public void setConfigs(List<CacheConfig> configs) {
        this.configs = configs;
    }

    public static class CacheConfig {
        /**
         * cache key
         */
        private String key;
        /**
         * 过期时间，sec
         */
        private long second = 60;


        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public long getSecond() {
            return second;
        }

        public void setSecond(long second) {
            this.second = second;
        }
    }
}
